$(function () {
    window.onload = function () {
        $('.dg').children().mouseenter(function () {
            $(".navigation").children().children().children().eq(4).css('color', 'red')
        })
        $('.dg').children().mouseleave(function () {
            $(".navigation").children().children().children().eq(4).css('color', '')
        })

        $.ajax({
            url: 'http://localhost:3000/useing/master',
            methode: 'get',
            success: function (res) {
                var str = '';

                $.each(res, function (index, item) {
                    if (index < 4) {
                        str += "<li>" +
                            "<div class=xiangqing>" +
                            "<img src=" + item.img + ">" +
                            "<div class=wz>" +
                            "<h4>" + item.text + "</h4>" +
                            "<p class=p3><span> 苏苏2016-01-25</span><span class=sp1><img src=../tubiao/zan.png>3<img src = ../tubiao/reply.png>3</span></p>" +
                            "</div></li>" +
                            "<p class=p>关于格林威特空气净化器还有四篇报道，点击加载更多</p>"
                    }



                })
                $(".zuixin ul").html(str);
            }
        })
    }
    $('.dg').children().mouseenter(function () {
        $(this).css('border-bottom', '3px solid red').show();
        $(this).children().css('color', 'red')

    })
    $('.dg').children().mouseleave(function () {
        $(this).css('border-bottom', 'none');
        $(this).children().css('color', '');

    })
    $('.list').children().mouseenter(function () {
        $(this).children().css('color', '#000')
    })
    $('.list').children().mouseleave(function () {
        $(this).children().css('color', '#d1cece');

    })
})